//
//  MCGameRecordTableViewCell.m
//  TLYL
//
//  Created by miaocai on 2017/7/10.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import "MCGameRecordTableViewCell.h"

@interface MCGameRecordTableViewCell()

@property (weak, nonatomic)  UILabel *lottoryLabel;
@property (weak, nonatomic)  UILabel *lottroyDetailLabel;
@property (weak, nonatomic)  UILabel *qihaoLabel;
@property (weak, nonatomic)  UILabel *qihaoDetailLabel;
@property (weak, nonatomic)  UILabel *jinELabel;
@property (weak, nonatomic)  UILabel *jinEDetailLabel;
@property (weak, nonatomic)  UILabel *dateLabel;
@property (weak, nonatomic)  UILabel *dateDetailLabel;
@property (weak, nonatomic)  UILabel *statusLabel;

@end

@implementation MCGameRecordTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUpUI];
    }
    return self;
}

-(void)setUpUI{
    UILabel *lottoryLabel = [[UILabel alloc] init];
    [self.contentView addSubview:lottoryLabel];
    self.lottoryLabel = lottoryLabel;
    lottoryLabel.text = @"彩种：";
    
    UILabel *lottroyDetailLabel = [[UILabel alloc] init];
    [self.contentView addSubview:lottroyDetailLabel];
    self.lottroyDetailLabel = lottroyDetailLabel;
    self.lottroyDetailLabel.text = @"12345";
    
    UILabel *qihaoLabel = [[UILabel alloc] init];
    [self.contentView addSubview:qihaoLabel];
    self.qihaoLabel = qihaoLabel;
    self.qihaoLabel.text = @"期号：";
    
    UILabel *qihaoDetailLabel = [[UILabel alloc] init];
    [self.contentView addSubview:qihaoDetailLabel];
    self.qihaoDetailLabel = qihaoDetailLabel;
    self.qihaoDetailLabel.text = @"12345";
    
    UILabel *jinELabel = [[UILabel alloc] init];
    [self.contentView addSubview:jinELabel];
    self.jinELabel = jinELabel;
    self.jinELabel.text = @"金额：";
    
    UILabel *jinEDetailLabel = [[UILabel alloc] init];
    [self.contentView addSubview:jinEDetailLabel];
    self.jinEDetailLabel = jinEDetailLabel;
    self.jinEDetailLabel.text = @"12345";
    UILabel *dateLabel = [[UILabel alloc] init];
    [self.contentView addSubview:dateLabel];
    self.dateLabel = dateLabel;
    self.dateLabel.text = @"日期：";
    
    UILabel *dateDetailLabel = [[UILabel alloc] init];
    [self.contentView addSubview:dateDetailLabel];
    self.dateDetailLabel = dateDetailLabel;
    self.dateDetailLabel.text = @"12345";
    UILabel *statusLabel = [[UILabel alloc] init];
    [self.contentView addSubview:statusLabel];
    statusLabel.text = @"状态";
    self.statusLabel = statusLabel;
    
    self.lottoryLabel.font = [UIFont systemFontOfSize:14];
    self.lottroyDetailLabel.font = [UIFont systemFontOfSize:14];
    self.qihaoLabel.font = [UIFont systemFontOfSize:14];
    self.qihaoDetailLabel.font = [UIFont systemFontOfSize:14];
    self.jinELabel.font = [UIFont systemFontOfSize:14];
    self.jinEDetailLabel.font = [UIFont systemFontOfSize:14];
    self.dateLabel.font = [UIFont systemFontOfSize:14];
    self.dateDetailLabel.font = [UIFont systemFontOfSize:14];
    self.statusLabel.font = [UIFont systemFontOfSize:14];
    self.lottoryLabel.textColor = [UIColor blackColor];
    self.lottroyDetailLabel.textColor = [UIColor blackColor];
    self.qihaoLabel.textColor = [UIColor blackColor];
    self.qihaoDetailLabel.textColor = [UIColor blackColor];
    self.jinELabel.textColor = [UIColor blackColor];
    self.jinEDetailLabel.textColor = [UIColor blackColor];
    self.dateLabel.textColor = [UIColor blackColor];
    self.dateDetailLabel.textColor = [UIColor blackColor];
    self.statusLabel.textColor = [UIColor blackColor];
}
- (void)layoutSubviews{
    [super layoutSubviews];
    
    [self.lottoryLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.equalTo(self.contentView).offset(MC_REALVALUE(10));
    }];
    [self.lottroyDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.lottoryLabel);
        make.left.equalTo(self.lottoryLabel.mas_right);
    }];
    
    [self.qihaoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.lottoryLabel);
        make.top.equalTo(self.lottoryLabel.mas_bottom).offset(MC_REALVALUE(10));
    }];
    [self.qihaoDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.qihaoLabel);
        make.left.equalTo(self.qihaoLabel.mas_right);
    }];
    [self.jinELabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.lottoryLabel);
        make.top.equalTo(self.qihaoLabel.mas_bottom).offset(MC_REALVALUE(10));
    }];
    [self.jinEDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.jinELabel);
        make.left.equalTo(self.jinELabel.mas_right);
    }];
    [self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.lottoryLabel);
        make.top.equalTo(self.jinELabel.mas_bottom).offset(MC_REALVALUE(10));
    }];
    [self.dateDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.dateLabel);
        make.left.equalTo(self.dateLabel.mas_right);
    }];
    
    [self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).offset(-MC_REALVALUE(20));
        make.centerY.equalTo(self.contentView);
        
    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
